package com.sunny.fetch.pojo;

import javax.persistence.*;

@Table(name = "f_fund_nav")
public class FFundNav {
    @Id
    private Long tid;

    /**
     * TS代码
     */
    @Column(name = "ts_code")
    private String tsCode;

    /**
     * 公告日期
     */
    @Column(name = "ann_date")
    private String annDate;

    /**
     * 截止日期
     */
    @Column(name = "end_date")
    private String endDate;

    /**
     * 单位净值
     */
    @Column(name = "unit_nav")
    private Float unitNav;

    /**
     * 累计净值
     */
    @Column(name = "accum_nav")
    private Float accumNav;

    /**
     * 累计分红
     */
    @Column(name = "accum_div")
    private Float accumDiv;

    /**
     * 资产净值
     */
    @Column(name = "net_asset")
    private Float netAsset;

    /**
     * 合计资产净值
     */
    @Column(name = "total_netasset")
    private Float totalNetasset;

    /**
     * 复权单位净值
     */
    @Column(name = "adj_nav")
    private Float adjNav;

    public FFundNav(Long tid, String tsCode, String annDate, String endDate, Float unitNav, Float accumNav, Float accumDiv, Float netAsset, Float totalNetasset, Float adjNav) {
        this.tid = tid;
        this.tsCode = tsCode;
        this.annDate = annDate;
        this.endDate = endDate;
        this.unitNav = unitNav;
        this.accumNav = accumNav;
        this.accumDiv = accumDiv;
        this.netAsset = netAsset;
        this.totalNetasset = totalNetasset;
        this.adjNav = adjNav;
    }

    public FFundNav() {
        super();
    }

    /**
     * @return tid
     */
    public Long getTid() {
        return tid;
    }

    /**
     * @param tid
     */
    public void setTid(Long tid) {
        this.tid = tid;
    }

    /**
     * 获取TS代码
     *
     * @return ts_code - TS代码
     */
    public String getTsCode() {
        return tsCode;
    }

    /**
     * 设置TS代码
     *
     * @param tsCode TS代码
     */
    public void setTsCode(String tsCode) {
        this.tsCode = tsCode;
    }

    /**
     * 获取公告日期
     *
     * @return ann_date - 公告日期
     */
    public String getAnnDate() {
        return annDate;
    }

    /**
     * 设置公告日期
     *
     * @param annDate 公告日期
     */
    public void setAnnDate(String annDate) {
        this.annDate = annDate;
    }

    /**
     * 获取截止日期
     *
     * @return end_date - 截止日期
     */
    public String getEndDate() {
        return endDate;
    }

    /**
     * 设置截止日期
     *
     * @param endDate 截止日期
     */
    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    /**
     * 获取单位净值
     *
     * @return unit_nav - 单位净值
     */
    public Float getUnitNav() {
        return unitNav;
    }

    /**
     * 设置单位净值
     *
     * @param unitNav 单位净值
     */
    public void setUnitNav(Float unitNav) {
        this.unitNav = unitNav;
    }

    /**
     * 获取累计净值
     *
     * @return accum_nav - 累计净值
     */
    public Float getAccumNav() {
        return accumNav;
    }

    /**
     * 设置累计净值
     *
     * @param accumNav 累计净值
     */
    public void setAccumNav(Float accumNav) {
        this.accumNav = accumNav;
    }

    /**
     * 获取累计分红
     *
     * @return accum_div - 累计分红
     */
    public Float getAccumDiv() {
        return accumDiv;
    }

    /**
     * 设置累计分红
     *
     * @param accumDiv 累计分红
     */
    public void setAccumDiv(Float accumDiv) {
        this.accumDiv = accumDiv;
    }

    /**
     * 获取资产净值
     *
     * @return net_asset - 资产净值
     */
    public Float getNetAsset() {
        return netAsset;
    }

    /**
     * 设置资产净值
     *
     * @param netAsset 资产净值
     */
    public void setNetAsset(Float netAsset) {
        this.netAsset = netAsset;
    }

    /**
     * 获取合计资产净值
     *
     * @return total_netasset - 合计资产净值
     */
    public Float getTotalNetasset() {
        return totalNetasset;
    }

    /**
     * 设置合计资产净值
     *
     * @param totalNetasset 合计资产净值
     */
    public void setTotalNetasset(Float totalNetasset) {
        this.totalNetasset = totalNetasset;
    }

    /**
     * 获取复权单位净值
     *
     * @return adj_nav - 复权单位净值
     */
    public Float getAdjNav() {
        return adjNav;
    }

    /**
     * 设置复权单位净值
     *
     * @param adjNav 复权单位净值
     */
    public void setAdjNav(Float adjNav) {
        this.adjNav = adjNav;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tid=").append(tid);
        sb.append(", tsCode=").append(tsCode);
        sb.append(", annDate=").append(annDate);
        sb.append(", endDate=").append(endDate);
        sb.append(", unitNav=").append(unitNav);
        sb.append(", accumNav=").append(accumNav);
        sb.append(", accumDiv=").append(accumDiv);
        sb.append(", netAsset=").append(netAsset);
        sb.append(", totalNetasset=").append(totalNetasset);
        sb.append(", adjNav=").append(adjNav);
        sb.append("]");
        return sb.toString();
    }
}